package cn.broadsense.thrid.result;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 分页查询任务结果
 *
 * @author pengxin
 * @date 2022-10-10 10:18
 */
@NoArgsConstructor
@Data
public class EvPlanTaskPageResult implements Serializable {
    private static final long serialVersionUID = 5249129722324558813L;


    private Integer nextPage;
    private Integer totalCount;
    private List<ResultsPlanTaskPageResult> results;

    @NoArgsConstructor
    @Data
    public static class ResultsPlanTaskPageResult {
        private String planTaskName;
        private String planTaskId;
        private Integer taskSource;
        private Integer analysisType;
        private Integer channelCount;
        private List<String> algorithms;
        private Integer runningStatus;
        private Integer enableStatus;
        private OrchestrationPlanTaskPageResult orchestration;
        private List<ErrorChannelsPlanTaskPageResult> errorChannels;
        private String createTime;
        private String createUserName;
        private String createUserDeptName;
        private String createUserDeptCode;

        @NoArgsConstructor
        @Data
        public static class OrchestrationPlanTaskPageResult {
            private String orchestrationType;
            private Integer channelIntervalSecond;
            private DisposablePlanTaskPageResult disposable;
            private List<AnalysisPeriodsPlanTaskPageResult> analysisPeriods;
            private CyclePlanTaskPageResult cycle;
            private PollingPlanTaskPageResult polling;

            @NoArgsConstructor
            @Data
            public static class DisposablePlanTaskPageResult {
                private String startDate;
                private String endDate;
            }

            @NoArgsConstructor
            @Data
            public static class CyclePlanTaskPageResult {
                private List<Integer> dayOfWeek;
            }

            @NoArgsConstructor
            @Data
            public static class PollingPlanTaskPageResult {
                private Boolean enable;
                private Integer pollingInterval;
                private Integer pollingCount;
            }

            @NoArgsConstructor
            @Data
            public static class AnalysisPeriodsPlanTaskPageResult {
                private String startTime;
                private String endTime;
            }
        }

        @NoArgsConstructor
        @Data
        public static class ErrorChannelsPlanTaskPageResult {
            private String errorMsg;
            private List<String> channelNames;
        }
    }
}
